package com.travel.model.dto.auth;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.List;
//jwt响应 令牌 令牌类型 用户id 用户名 用户邮箱 用户角色
@Data
@AllArgsConstructor
@Schema(description = "JWT响应")
public class JwtResponse {
    @Schema(description = "访问令牌")
    private String token;
    
    @Schema(description = "令牌类型")
    private String type = "Bearer";
    
    @Schema(description = "用户ID", example = "1")
    private Long id;
    
    @Schema(description = "用户名", example = "john_doe")
    private String username;
    
    @Schema(description = "用户邮箱", example = "john@example.com")
    private String email;
    
    @Schema(description = "用户角色", example = "['ROLE_USER']")
    private List<String> roles;

    public JwtResponse(String token, Long id, String username, String email, List<String> roles) {
        this.token = token;
        this.id = id;
        this.username = username;
        this.email = email;
        this.roles = roles;
    }
} 